package com.dcd.service;

import com.dcd.pojo.Collection_information;
import com.dcd.service.impl.Collection_informationServiceImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Component
@FeignClient(name = "donchedi-provider9091",fallback = Collection_informationServiceImpl.class,contextId = "collectionInformation")
public interface Collection_informationService {

    /**
     * 根据用户登入id查询咨询收藏
     * @param user_id 用户登入id
     * @return
     */
    @RequestMapping("/select_collection_informationList_byId")
    public List<Collection_information> select_collection_informationList_byId(@RequestParam int user_id);

    /**
     * 根据类型判断做添加或删除
     * @param collection_information 资讯收藏表对象
     * @param type 类型
     * @return
     */
    @RequestMapping("/insert_or_delete_collection_information")
    public String insert_or_delete_collection_information(@RequestBody Collection_information collection_information, @RequestParam String type);

    /**
     * 查询用户是否关注指定
     * @param collection_information
     * @return
     */
    @RequestMapping("/select_user_collection_infomation")
    public String select_user_collection_infomation(@RequestBody Collection_information collection_information);
}
